<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Language" content="zh-CN">
<meta name="Keywords" content="SuperSlide,jQuery-滑动块导航">
<meta name="Description" content="SuperSlide,jQuery-滑动块导航">
<title>SuperSlide - 滑动块导航</title>
<script type="text/javascript" src="../../jquery1.42.min.js"></script><script type="text/javascript" src="../../jquery.SuperSlide.2.1.js"></script>
</head>
<body>


<style type="text/css">
	/* css 重置 */
	*{margin:0; padding:0; list-style:none; }
	body{ background:#fff; font:normal 12px/22px 宋体;  }
	img{ border:0;  }
	a{ text-decoration:none; color:#333;  }
	a:hover{ color:#FF8400;  }
	.js{width:90%; margin:10px auto 0 auto; }
	.js p{ padding:5px 0; font-weight:bold; overflow:hidden;  }
	.js p span{ float:right; }
	.js p span a{ color:#f00; text-decoration:underline;   }
	.js textarea{ height:190px;  width:98%; padding:5px; border:1px solid #ccc; border-top:2px solid #aaa;  border-left:2px solid #aaa;  }

	/* 本例子css */
	.clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden;}
	.navBar{  position:relative; z-index:1; padding-left:10px;   height:60px; line-height:60px; background:url(images/line.gif) repeat-x 0 bottom #fff; color:#333;   }
	.nav{ position:relative; width:980px; margin:0 auto;  font-family:"Microsoft YaHei",SimSun,SimHei; font-size:14px; }
	.nav a{ color:#333;  }
	.nav h3{ font-size:100%; font-weight:normal;   }
	.nav .m{ float:left;  position:relative; z-index:1; }
	.nav .s{ float:left; width:3px; text-align:center; color:#D4D4D4; font-size:12px; }
	.nav h3 a{ display:block; width:124px; text-align:center;   font-weight:bold;  }
	.nav .sub{ display:none; /*默认隐藏*/  position:absolute; left:-3px; top:60px; z-index:1; width:128px; border:1px solid #E6E4E3; border-top:0;  background:#fff; }
	.nav .sub li{ text-align:center; padding:0 8px; margin-bottom:-1px;   }
	.nav .sub li a{ display:block;  border-bottom:1px solid #E6E4E3; padding:8px 0; height:28px; line-height:28px; color:#666;   }
	.nav .sub li a:hover{ color:#FE7700;   }
	.nav .block{ height:3px; width:130px; background:#FE7700; position:absolute; left:0; top:57px; overflow:hidden;  }


</style>

	<!-- 本例子代码 开始 ------------------------------------------->
	<div class="navBar">
			<ul class="nav clearfix">
				<li class="m">
					<h3><a target="_blank" href="http://www.superslide2.com/">网站首页</a></h3>
				</li>
				<li class="s">|</li>
				<li class="m">
					<h3><a target="_blank" href="http://www.superslide2.com/">如何使用</a></h3>
					<ul class="sub">
						<li><a href="#">如何使用</a></li>
						<li><a href="#">如何使用</a></li>
						<li><a href="#">如何使用</a></li>
						<li><a href="#">如何使用</a></li>
					</ul>
				</li>
				<li class="s">|</li>
				<li class="m "><!-- 当前频道添加on -->
					<h3><a target="_blank" href="http://www.superslide2.com/">查看参数</a></h3>
					<ul class="sub">
						<li><a href="#">查看参数</a></li>
						<li><a href="#">查看参数</a></li>
						<li><a href="#">查看参数</a></li>
						<li><a href="#">查看参数</a></li>
					</ul>
				</li>
				<li class="s">|</li>
				<li class="m">
					<h3><a target="_blank" href="http://www.superslide2.com/">基础效果</a></h3>
					<ul class="sub">
						<li><a href="#">基础效果</a></li>
						<li><a href="#">基础效果</a></li>
						<li><a href="#">基础效果</a></li>
						<li><a href="#">基础效果</a></li>
					</ul>
				</li>
				<li class="s">|</li>
				<li class="m">
					<h3><a target="_blank" href="http://www.superslide2.com/">扩展效果</a></h3>
					<ul class="sub">
						<li><a href="#">扩展效果</a></li>
						<li><a href="#">扩展效果</a></li>
						<li><a href="#">扩展效果</a></li>
						<li><a href="#">扩展效果</a></li>
					</ul>
				</li>
				<li class="s">|</li>
				<li class="m">
					<h3><a target="_blank" href="http://www.superslide2.com/">SuperSlide</a></h3>
				</li>
				<li class="s">|</li>
				<li class="m">
					<h3><a target="_blank" href="http://www.superslide2.com/">大话主席</a></h3>
				</li>
				<li class="block"></li><!-- 滑动块 -->
			</ul>
	</div>
	<div class="content" style="height:120px"><!-- 内容 --></div>

	<script type="text/javascript">

	(function(){
			var ind = 2; //初始位置
			var nav= jQuery(".nav");
			var init = jQuery(".nav .m").eq(ind);
			var block = jQuery(".nav .block"); //滑块
			block.css({"left":init.position().left-3}); //初始化滑块位置
			nav.hover(function(){},function(){ block.animate({"left":init.position().left-3},100); }); //移出导航滑块返回

			jQuery(".nav").slide({ 
					type:"menu", //效果类型
					titCell:".m", // 鼠标触发对象
					targetCell:".sub", // 效果对象，必须被titCell包含
					delayTime:300, // 效果时间
					triggerTime:0, //鼠标延迟触发时间
					returnDefault:true,//on返回初始位置
					defaultIndex:ind,//初始位置
					startFun:function(i,c,s,tit){ //控制当前滑块位置
						block.animate({"left":tit.eq(i).position().left-3},100);
					}
				});
	})()

	</script> 
	<!-- 本例子代码 结束 ------------------------------------------->


	<div class="js">
		<p><span>效果参考网址：<a href="#"></a></span>js调用：</p>
		<textarea>
var ind = 2; //初始位置
var nav= jQuery(".nav");
var init = jQuery(".nav .m").eq(ind);
var block = jQuery(".nav .block"); 
block.css({"left":init.position().left-3}); 
nav.hover(function(){},function(){ block.animate({"left":init.position().left-3},100); });
jQuery(".nav").slide({ 
		type:"menu",titCell:".m", targetCell:".sub", delayTime:300, triggerTime:0, returnDefault:true,defaultIndex:ind,
		startFun:function(i,c,s,tit){ //控制当前滑块位置
			block.animate({"left":tit.eq(i).position().left-3},100);
		}
	});
		</textarea>
	</div>



</body>
</html>
<script type="text/javascript">
//百度统计代码
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3Fa630f96b6a9dd549675d26373853f7f1' type='text/javascript'%3E%3C/script%3E"));
</script>

